package imooc.user.service.impl;

import imooc.user.dataobject.UserInfo;
import imooc.user.repository.UserInfoRepository;
import imooc.user.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/** 通过openId查询用户信息
 * @author Jiayuan
 * @version 1.0
 * @description:
 * @time 11/8/2018 9:30 PM
 */
@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserInfoRepository repository;

    @Override
    public UserInfo findByOpenId(String openId) {
        return repository.findByOpenid(openId);
    }
}
